home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr11 / pdox693.zip / TI699.ASC < prev    next >
Text File  |  1992-10-19  |  4KB  |  133 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.   PRODUCT  :  Paradox                                NUMBER  :  699
  9.   VERSION  :  2.0 & up
  10.        OS  :  DOS
  11.      DATE  :  October 19, 1992                         PAGE  :  1/2
  12.  
  13.     TITLE  :  Implementing Fieldview in a PAL Application
  14.  
  15.  
  16.  
  17.  
  18.   In a WAIT TABLE or WAIT RECORD statement that lists <Insert> and
  19.   <Delete> in its UNTIL clause, additional programming must be done
  20.   to process Fieldview correctly.  While in WAIT TABLE or WAIT
  21.   RECORD the user can enter Fieldview by pressing <Alt-F5> or
  22.   <Ctrl-F>.  Without additional programming, the following problem
  23.   will arise.  When the user presses <Insert> or <Delete> while in
  24.   Fieldview, the Paradox code to handle <Insert> and <Delete> is
  25.   invoked causing Paradox to insert or delete a record rather
  26.   inserting or deleting a character.
  27.  
  28.   In Fieldview mode, <Insert> and <Delete> should insert and delete
  29.   characters, and in Edit and Coedit mode, these keys should insert
  30.   and delete records.
  31.  
  32.   The correct way to implement <Insert> and <Delete> in Fieldview
  33.   is to add Fieldview to the Until clause of the WAIT statement.
  34.   The following PAL program demonstrates this method.
  35.  
  36.   ===============================================================
  37.   COEDIT "Customer"                    ; Coedit the Customer Table
  38.  
  39.   WHILE TRUE
  40.  
  41.         WAIT RECORD
  42.         UNTIL "DO_IT!","FIELDVIEW","DEL","INS","PGUP","PGDN"
  43.                       ; Note Fieldview in above line
  44.         SWITCH
  45.             CASE RETVAL = "DO_IT!"    :  ; <Do_It!> pressed
  46.                  DO_IT!
  47.                  QUIT
  48.  
  49.             CASE RETVAL = "FIELDVIEW" :
  50.                  FIELDVIEW
  51.                       ; Fieldview handling code
  52.                       ; Invoke Fieldview, wait for Enter to be
  53.                       ; pressed.
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.   PRODUCT  :  Paradox                                NUMBER  :  699
  75.   VERSION  :  2.0 & up
  76.        OS  :  DOS
  77.      DATE  :  October 19, 1992                         PAGE  :  2/2
  78.  
  79.     TITLE  :  Implementing Fieldview in a PAL Application
  80.  
  81.  
  82.  
  83.  
  84.                  WAIT FIELD
  85.                     PROMPT "Press Enter to end fieldview",""
  86.                  UNTIL "ENTER"
  87.                       ; User may insert and delete characters while
  88.                       ; in Fieldview
  89.  
  90.             OTHERWISE :                        ; Process other keys
  91.                  KEYPRESS RETVAL
  92.         ENDSWITCH
  93.  
  94.   ENDWHILE
  95.  
  96.   ===============================================================
  97.  
  98.   This program places the "Customer" table into Coedit mode, then
  99.   uses WAIT RECORD to allow the user to edit the table until
  100.   <DO_IT!>, <FIELDVIEW>, <DELETE>, <INSERT>, <PGUP>, <PGDN> is
  101.   pressed.  When the user enters Fieldview mode, by pressing <Alt-
  102.   F5> or <Ctrl-F>, the program uses a WAIT FIELD statement to allow
  103.   the user to make changes to the field.  While in Fieldview the
  104.   user can press <INSERT> and <DELETE> to insert and delete
  105.   characters.  When the user presses <Enter>, the Fieldview
  106.   terminates and returns to the WAIT TABLE statement allowing the
  107.   user to continue Coediting the table.  When a user presses
  108.   <INSERT>, and <DELETE> in CoEdit mode, these keys insert and
  109.   delete records.
  110.  
  111.   DISCLAIMER: You have the right to use this technical information
  112.   subject to the terms of the No-Nonsense License Statement that
  113.   you received with the Borland product to which this information
  114.   pertains.
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.